//
//  YIem_FindDetail_ShareTableViewCell.m
//  B段_开眼
//
//  Created by YIem on 16/4/25.
//  Copyright © 2016年 Howie. All rights reserved.
//

#import "YIem_FindDetail_ShareTableViewCell.h"
@interface YIem_FindDetail_ShareTableViewCell ()

@property (nonatomic, strong) UIImageView *imageBack;
@property (nonatomic, strong) UILabel *labelTitle;
@property (nonatomic, strong) UILabel *labelTime;
@end
@implementation YIem_FindDetail_ShareTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.imageBack = [[UIImageView alloc] init];
        [self.contentView addSubview:self.imageBack];
        self.labelTitle = [[UILabel alloc] init];
        self.labelTitle.font = [UIFont systemFontOfSize:20 weight:2];
        self.labelTitle.textColor = [UIColor whiteColor];
        [self.contentView addSubview:self.labelTitle];
        
        
        self.labelTime = [[UILabel alloc] init];
        self.labelTime.font = [UIFont systemFontOfSize:16];
        self.labelTime.textColor = [UIColor whiteColor];
        [self.contentView addSubview:self.labelTime];
        
        
        
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.imageBack.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
    self.labelTitle.frame = CGRectMake(0, 0, 200, 40);
    self.labelTime.frame = CGRectMake(0, 50, 100, 30);
}
- (void)setModel:(EveryCellModel *)model
{
    _model = model;
    [self.imageBack sd_setImageWithURL:[NSURL URLWithString:model.feed]];
    self.labelTitle.text = model.title;
    self.labelTime.text = [NSString stringWithFormat:@"#%@ / %@",model.category, model.date];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
